package demo3;

class Parent {
    public int a;
    {
        System.out.println("父类：实例代码块");
    }
    static {
        System.out.println("父类：静态代码块");
    }
    public Parent(int a) {
        this.a = a;
        System.out.println("父类：构造代码块");
    }
}
class Son extends Parent{
    public int c;

    {
        System.out.println("子类：实例代码块");
    }
    static {
        System.out.println("子类：静态代码块");
    }
    public Son(int a, int c) {
        super(a);
        this.c = c;
        System.out.println("子类：构造方法");
    }
}
class Man {
    public static int k;
    static {
        System.out.println("第一条");
    }
    static {
        System.out.println("第二条");
    }
}
public class Test {
    public static void main(String[] args) {
        Man man = new Man();
    }
}
